package com.qumall.boot.entity;



import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
//import io.swagger.annotations.ApiModel;
//import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

//import javax.validation.constraints.Min;
//import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.time.LocalDateTime;

@Data
//@ApiModel(value = "User", description = "用户实体类")
public class User implements Serializable {
    private static final long serialVersionUID = 1L;


//    @ApiModelProperty(name = "id")
    private Integer id;

//    @ApiModelProperty(value = "账号")
    private String account;

    private String password;
    private String phone;
    private String email;
//    @JsonDeserialize(using = LocalDateTimeDeserializer.class) // 反序列化
//    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createtime;
//    @JsonDeserialize(using = LocalDateTimeDeserializer.class) // 反序列化
//    @JsonSerialize(using = LocalDateTimeSerializer.class) // 序列化
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updatetime;

}

